﻿<link href='http://fonts.googleapis.com/css?family=Radley' rel='stylesheet' type='text/css'>
<?php  
	if (isset($_GET['dia'])){
		$dat=$_GET['dia'].'/'.$_GET['mes'].'/'.$_GET['ano'];
	}else
		$dat=date("d/m/Y"); 
?>
<!--	<table width="20%" >
      <tr>
        <th valign="top" scope="col">        
        <div style="font-size:11px">
 	    <?php // include "class/calendar.php";?>
        </div>

        </th>
      <th valign="top" scope="col">-->

<?php
include "class/functions.php";	
	include_once("class/class.php");
	$c=new ClassCon();
	$data=converteData($dat);
/*	echo DataEx($dat);	
	$sql="select * from leituras where dia='" . $data ."' order by numero";
	//echo "<p>".$sql;

	$result=$c->seleciona($sql);
	if ($c->Ok($result)){
		$conf=true;
		while ($c->listar($result)){
			echo "<td width='100'><p><font size=4><b>" . $c->row["numero"] . "ª leitura</b></font></td><td width='100'><font size=4><i>" . $c->row["livro"] . '</i></font></td>';
			echo "</tr><tr><td colspan=2 class='td'><hr color='#DDDDDD' noshade='noshade' />" . $c->row["texto"] . '<p><hr color="#DDDDDD" noshade="noshade" /></td></tr>';
			if ($conf){
				$c2=new ClassCon();
				$sql="select * from salmos where dia='" . $data ."' order by numero";
				$r=$c2->seleciona($sql);
				if ($c2->Ok($r)){
					while ($c2->listar($r)){
						echo "<tr><td><font size=4><b>Salmo Responsorial</b></font></td><td><font size=4><i>" . $c2->row["livro"] . '</i></font></td>'; 
						echo "</tr><tr><td colspan=2  class='td'><hr color='#DDDDDD' noshade='noshade' />" . $c2->row["texto"] . '<p><hr color="#DDDDDD" noshade="noshade" /></td></tr>';
					}
				}
			}
			$conf=false;
		}
		unset($c2);
	}

		$sql="select * from evangelios where dia='" . $data . "'";
		$result=$c->seleciona($sql);
		if ($c->Ok($result)){
			while ($c->listar($result)){
				echo "<tr><td ><font size=4><b>Evangelho</b></font></td><td><font size=4><i>" . $c->row["livro"] . '</font></i></td>';
				echo "</tr><tr><td colspan=2  class='td'><hr color='#DDDDDD' noshade='noshade' />" . $c->row["texto"] . '<p><hr color="#DDDDDD" noshade="noshade" /></td></tr>';
			}
		}
		*/
		?>
 <table width="80%" style="font-size:16px">
	
    <tr><td class='td'>
<script language="JavaScript" src="http://www.bibliacatolica.com.br/leituras/js.php" type="text/javascript"></script>
</td>

<td class='td' align="justify" valign="top" width="40%" style="border-left: #999; border-left-style: solid; border-left-width:thin"><font size=4><b> Palavra da Sacerdote </b></font><hr color="#DDDDDD" noshade="noshade" /><br />
	<?php
		$sql="select * from palavas where dia='" . $data . "'";
		$result=$c->seleciona($sql);
		if ($c->Ok($result)){
			while ($c->listar($result)){
				?>
				
              
				<?php echo $c->row["texto"] ;?><p><hr color="#DDDDDD" noshade="noshade" /></td></tr>
			<?php }
		}
	unset($c);?>
    </table>
	